﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using MathematicallySafe.HeadCounter.ViewModels;

namespace MathematicallySafe.HeadCounter.Views
{
    /// <summary>
    /// Interaction logic for LootView.xaml
    /// </summary>
    public partial class LootView : UserControl
    {
        public LootView()
        {
            InitializeComponent();
        }

        private void LootViewInitialized(object sender, EventArgs e)
        {
            ViewModel = new LootViewModel();
            ViewModel.LootTableUpdated += ViewModel_LootTableUpdated;
        }

        void ViewModel_LootTableUpdated()
        {
            listViewLootTable.Items.Refresh();
        }

        public LootViewModel ViewModel
        {
            get { return DataContext as LootViewModel; }
            set { DataContext = value; }
        }
    }
}
